package com.example.demo02.exception;

import cn.hutool.core.util.StrUtil;
import com.example.demo02.enums.ErrorCodeEnum;
import org.springframework.ui.context.ThemeSource;

public class ServiceException extends RuntimeException{
    public ServiceException(String errorMessage,Object... params) {
        super(StrUtil.format(errorMessage,params));
    }

    public ServiceException(ErrorCodeEnum errorCodeEnum,Object... params) {
        this(errorCodeEnum.getLabel(),params);
    }
}
